﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Web;

namespace NK.Mvc3.Models
{
    public class SaleDetail
    {
        public int ID { get; set; }

        [Required()]
        public int ProductInfoID { get; set; }
        public virtual ProductInfo ProductInfo { get; set; }

        [Required()]
        public int SaleID { get; set; }
        public virtual Sale Sale { get; set; }

        [Required()]
        [Range(1,int.MaxValue)]
        public int Quantity { get; set; }

        [Required()]
        [DisplayFormat(DataFormatString = "{0:#,###}")]
        public double CostSale { get; set; }

        [Required()]
        [DisplayFormat(DataFormatString = "{0:#,###}")]
        public double TotalCost { get; set; }
    }
}